Automatic optimization of the posistion of stems of text characters

ABSTRACT

Automatically positioning of typographical features, such as vertical stems or horizontal segments of a character, on high contrast pixel sub-component boundaries as part of a rendering process that uses separately controllable pixel sub-components of pixels to represent different portions of the character. In order to identify the typographical features of the character that are to be aligned with high contrast pixel sub-component boundaries, topology of the character is analyzed at runtime. In display devices having vertical stripes of same-colored pixel sub-components, character legibility is increased when the left edges of stems are aligned with high contrast boundaries between pixel sub-components. Processing time and resources are conserved by performing a partial, rather than a full, topological analysis of the character. For example, some font files include data structures that define the position of key control points associated with the character, thereby indicating where the stems or other typographical features are located, and the relationship between different typographical features.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.10/606,047, filed Jun. 24, 2003, which is a continuation of U.S. patentapplication Ser. No. 09/546,139, filed Apr. 10, 2000, which is acontinuation-in-part of U.S. patent application Ser. No. 09/168,015,filed Oct. 7, 1998, now issued as U.S. Pat. No. 6,421,054. The foregoingpatent and patent applications are incorporated herein by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to systems and methods for displayingimages on a display device. More specifically, the present informationrelates to systems and methods for displaying text characters on adisplay device having separately controllable pixel sub-components, withselected edges of the characters being positioned at high contrast pixelsub-component boundaries.

2. Background of the Invention

A key aspect of many technologies, especially computers, is therequirement of visual interaction with an end user. In fact, the dataand information displayed by many applications are especially designedto have a visually pleasing and aesthetic appearance. Word processors,for example, typically attempt to emulate an actual piece of paper bycausing the screen to display a graphical a piece of paper. As the wordprocessor creates a document, the text and images are placed on thegraphic piece of paper as they will appear when physically rendered. Thevisual interaction of the end user with the display device is thereforean integral part of many technologies.

An important aspect of the visual interaction with an end user is theability to display color. A typical display device has a screen that hasa large number of pixels, and each pixel usually has red, green, andblue sub-pixels. Because the pixels are relatively small, the colordiscerned by the human eye is a blend of the red, green, and blue lightsof each pixel. By varying the intensity of the red, green, and bluelights, a display device is potentially capable of displaying millionsof different colors.

One common display device used to display color is a cathode ray tube(CRT) display device. The pixels of a CRT display are arranged in aparticular geometry, with each pixel consisting of three phosphors thatemit light when excited by a beam of electrons. For CRT display devices,the luminous intensity values assigned to the phosphors are calculatedtogether and the three phosphors in a pixel are controlled together togenerate at the pixel a color perceived by the user as having a selectedhue, intensity and saturation.

Another common display device, which is typically used for portablecomputers, is a liquid crystal display (LCD). LCD displays arepreferable to CRT displays in many instances primarily because LCDdisplays are usually smaller, weigh less, and consume less power thancomparably sized CRT displays. In computers that rely on batteries fortheir power, this is a significant advantage. The technology of LCDdisplays enables them to rival CRT displays in terms of sharpness andresolution.

Several differences, however, exist between CRT and LCD displays. Pixelsof LCD display devices, unlike those of CRT display devices, consist ofa plurality of pixel sub-components (usually three) that are separatelyaddressable and inherently separately controllable. In addition, thepixels in an LCD display are usually arranged to form horizontal orvertical stripes of same-colored pixel sub-components, whereas thegeometry of a the phosphors in a pixel of a CRT display is frequentlytriangular. In most LCD display devices used with portable computers,the pixels sub-components are arranged vertically, which results in red,green, and blue vertical stripes of same-colored pixel sub-components.Other LCD display devices have pixel sub-components arranged to formred, green and blue horizontal stripes of same-colored pixelsub-components. Other geometries may be used, but vertical andhorizontal arrangements are the most common.

The ability of an LCD display or other display to provide highresolution is dependent in part on the size and quantity of the pixelsin the LCD display, and in many situations, the resolution of LCDdisplays is not sufficient to enable text characters to be smoothlydrawn or rendered on the LCD display. The limited resolution of the LCDdisplay may have a significant visual impact on the user as the text orimage data is rendered on an LCD or other display.

Text characters or fonts, in particular, present unique problems.Technology permits a font to be stored on a computer with highresolution and when a high resolution character is rendered on a lowresolution or coarse display device, the character is fitted to thepixel grid of the display device. This results in a loss of informationrelating to the characters and frequently compromises the shape of thecharacters, which is contrary to the intent of the typographer.

More specifically, when a character is rendered to a low resolutiondisplay device or pixel grid, certain parts of the character as it isstored electronically may not fall exactly on the pixel boundaries. As aresult, the shape of the character is forcibly changed to conform withpixel boundaries in the pixel grid. The ultimate effect on the characteris that the character may be displaced in a certain direction or thestems, serifs, and other features of the character may be somewhatthicker or thinner than originally designed by the typographer.

Conventional text rendering processes that result in text charactersbeing displayed on display devices were originally designed to conformto the CRT model of pixels having three phosphors that are controlledtogether to display a single color and to represent a single portion ofthe image. With the advent of large numbers of portable personalcomputers, existing text rendering processes designed for CRT displaydevices were simply directly applied to LCD display devices. Suchconventional text rendering process, when applied to LCD displaydevices, use each pixel to represent a single portion of the image, anddo not take advantage of the separately addressable nature of the pixelsub-components.

In view of the foregoing, there is a need in the art for techniques forrendering text on LCD display devices that can improve the resolution ofthe text. It would be desirable to provide systems and methods thatcould enhance the readability of text and reduce the characterdistortion that has previously resulted from edges of characters beingrepositioned to boundaries of full pixels of LCD display devices.

BRIEF SUMMARY OF THE INVENTION

The present invention relates to systems and methods of rendering textand other images on LCD display devices or other display devices havingpixels with separately controllable pixel sub-components. According tothe invention, individual pixel sub-components represent differentportions of a text character or another image, rather than the entirepixel representing a single portion. This is accomplished by mappingspatially different sets of one or more samples of the image data toindividual pixel sub-components. Because the pixel sub-components areseparately addressable and controllable, the LCD display device operatedaccording to the invention renders images with improved resolutioncompared to the resolution generated by conventional renderingprocesses.

While the principles of the invention can be used to render any image,the invention is described herein primarily in the context of textcharacters. As part of the invention, character data is hinted, orfitted to a grid, such that selected edges of the character fall on highcontrast boundaries between pixel sub-components, thereby furtherimproving the appearance and readability of the text. Thus, not only areportions of the character displayed with sub-pixel resolution, butselected edges of the character are also positioned to reduce the colorfringing errors or effects that would otherwise be experienced.

The hinting process of the invention involves analyzing the topology ofthe outline of the character at runtime to identify edges of thecharacter that are to be repositioned to high contract boundariesbetween pixel sub-components. While the invention extends to a directand full analysis of the topology of the character, it is often morecomputationally efficient to analyze portions of the characterdefinition in a font file to identify control points on the characterthat are to be fitted to the high contrast boundaries and distancesbetween the control points.

Additional advantages of the invention will be set forth in thedescription which follows, and in part will be obvious from thedescription, or may be learned by the practice of the invention. Theadvantages of the invention may be realized and obtained by means of theinstruments and combinations particularly pointed out in the appendedclaims. These and other features of the present invention will becomemore fully apparent from the following description and appended claims,or may be learned by the practice of the invention as set forthhereinafter.

BRIEF DESCRIPTION OF THE DRAWINGS

In order that the manner in which the above-recited and other advantagesof the invention are obtained, a more particular description of theinvention briefly described above will be rendered by reference tospecific embodiments thereof which are illustrated in the appendeddrawings. Understanding that these drawings depict only typicalembodiments of the invention and are not therefore to be considered tobe limiting of its scope, the invention will be described and explainedwith additional specificity and detail through the use of theaccompanying drawings in which:

FIG. 1 illustrates an exemplary system that provides a suitableoperating environment for the present invention;

FIGS. 2 a and 2 b depict a portion of an LCD display and show theseparately controllable pixel sub-components of the pixels of the LCDdisplay;

FIG. 3 is a block diagram illustrating the process of rendering orrasterizing image data on a display device;

FIG. 4 a is an illustration of a character before it is positioned onpixel boundaries;

FIG. 4 b is an illustration of the character after it has beenpositioned on pixel boundaries;

FIG. 4 c is an illustration of the character after is has been phaseadjusted and the stems have been aligned on high contrast pixelsub-component boundaries;

FIG. 5 a is an illustration of the distances and dimensions associatedwith a character;

FIG. 5 b is an illustration of a directed acyclic graph used torepresent the distances associated with a character;

FIG. 6 is an illustration of the outline and control points that definea character;

FIG. 7 is a block diagram of the hinting process; and

FIG. 8 is a more detailed block diagram illustrating the method of phaseadjusting a character.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

One of the major problems associated with displaying information such astext on the screen of a display device is that the display device has acoarse pixel grid having a resolution that is much lower than theresolution of the information to be displayed. As a result of thisdiscrepancy, the rendering or rasterization process usually distorts andcompromises the information being displayed. In the case of text, thecharacter shapes are altered such that they fit the pixel grid of thedisplay device. The visual appearance and legibility of text or otherinformation on a screen is addressed in part by the process of hintingor instructing, which addresses the legibility issues of color,readability, spacing, weight, alignment, symmetry, and actual bitmapshapes of each character by aligning the typographical features of thecharacters in a font along pixel or pixel sub-component boundaries.

In the case of black text on a white background and other combinations,color refers to the balance between the black and white on a screen. Aneven and consistent color results in more legible text. Color isaffected by the contrast between thick and thin stem weights, the sizeof the spacing that is internal to the characters, the smoothness of adiagonal stroke and other factors. An even color is less distracting toa reader. Hinting improves the balance between white and black on thedisplay device such that the displayed image approaches an even color.

Readability refers to the identifiability of a particular character.Character sets, which are frequently referred to as fonts, typicallycontain a number of glyphs or characters which are represented by one ormore outlines. At low resolutions and small font sizes, it is difficultto legibly represent a character and it is frequently necessary to alterthe bitmap image that represents the glyph or character. Proper spacingalso contributes to legibility especially at low resolutions. Improperspacing typically occurs because the outline of the character istypically rounded up or down in order to accommodate the low resolutionpixel grid of a display device. Text data, however, is more legible ifthe space between characters and between words appears to be constant tothe reader.

The weight of a character generally refers to the thickness of thecharacter and the strokes of the character. For instance, a font that isbolded has a heavier weight than the same font that is not in bold type.Much of the difficulty with regard to weight occurs between uppercaseand lowercase characters. Uneven weighting can result in uppercasecharacters drawing too much attention to themselves or to an inabilityto distinguish headings from text.

Alignment refers to the tallness or pixel height of characters.Characters should be kept aligned especially at small sizes where adifference in the pixel height is more noticeable, because text that isnot properly aligned appears wavy and distracts the reader. The symmetryof a character is usually an issue with characters having diagonalstrokes although symmetry is an issue with characters that have othertypes of strokes, including rounded curves. Controlling the symmetry canimprove the appearance of individual characters and enhance the color ofthe text. In sum, hinting a font or character enhances the legibilityand appearance of a font as described above.

The invention is described below by using diagrams to illustrate eitherthe structure or processing of embodiments used to implement the systemsand methods of the present invention. Using the diagrams in this mannerto present the invention should not be construed as limiting of itsscope. The present invention encompasses both methods and systems forautomatically optimizing the placement of typographical features alonghigh contrast boundaries.

1. Exemplary Computing and Hardware Environments

The embodiments of the present invention may comprise a special purposeor general purpose computer including various computer hardware, asdiscussed in greater detail below. Embodiments within the scope of thepresent invention also include computer-readable media for carrying orhaving computer-executable instructions or data structures storedthereon. Such computer-readable media can be any available media whichcan be accessed by a general purpose or special purpose computer. By wayof example, and not limitation, such computer-readable media cancomprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage,magnetic disk storage or other magnetic storage devices, or any othermedium which can be used to carry or store desired program code means inthe form of computer-executable instructions or data structures andwhich can be accessed by a general purpose or special purpose computer.When information is transferred or provided over a network or anothercommunications connection (either hardwired, wireless, or a combinationof hardwired or wireless) to a computer, the computer properly views theconnection as a computer-readable medium. Thus, any such a connection isproperly termed a computer-readable medium. Combinations of the aboveshould also be included within the scope of computer-readable media.Computer-executable instructions comprise, for example, instructions anddata which cause a general purpose computer, special purpose computer,or special purpose processing device to perform a certain function orgroup of functions.

FIG. 1 and the following discussion are intended to provide a brief,general description of a suitable computing environment in which theinvention may be implemented. Although not required, the invention willbe described in the general context of computer-executable instructions,such as program modules, being executed by computers in networkenvironments. Generally, program modules include routines, programs,objects, components, data structures, etc. that perform particular tasksor implement particular abstract data types. Computer-executableinstructions, associated data structures, and program modules representexamples of the program code means for executing steps of the methodsdisclosed herein. The particular sequence of such executableinstructions or associated data structures represent examples ofcorresponding acts for implementing the functions described in suchsteps.

Those skilled in the art will appreciate that the invention may bepracticed in network computing environments with many types of computersystem configurations, including personal computers, hand-held devices,multi-processor systems, microprocessor-based or programmable consumerelectronics, network PCs, minicomputers, mainframe computers, and thelike. The invention may also be practiced in distributed computingenvironments where tasks are performed by local and remote processingdevices that are linked (either by hardwired links, wireless links, orby a combination of hardwired or wireless links) through acommunications network. In a distributed computing environment, programmodules may be located in both local and remote memory storage devices.

With reference to FIG. 1, an exemplary system for implementing theinvention includes a general purpose computing device in the form of aconventional computer 20, including a processing unit 21, a systemmemory 22, and a system bus 23 that couples various system componentsincluding the system memory 22 to the processing unit 21. The system bus23 may be any of several types of bus structures including a memory busor memory controller, a peripheral bus, and a local bus using any of avariety of bus architectures. The system memory includes read onlymemory (ROM) 24 and random access memory (RAM) 25. A basic input/outputsystem (BIOS) 26, containing the basic routines that help transferinformation between elements within the computer 20, such as duringstart-up, may be stored in ROM 24.

The computer 20 may also include a magnetic hard disk drive 27 forreading from and writing to a magnetic hard disk 39, a magnetic diskdrive 28 for reading from or writing to a removable magnetic disk 29,and an optical disk drive 30 for reading from or writing to removableoptical disk 31 such as a CD-ROM, CD-R, CD-RW or other optical media.The magnetic hard disk drive 27, magnetic disk drive 28, and opticaldisk drive 30 are connected to the system bus 23 by a hard disk driveinterface 32, a magnetic disk drive-interface 33, and an optical driveinterface 34, respectively. The drives and their associatedcomputer-readable media provide nonvolatile storage ofcomputer-executable instructions, data structures, program modules andother data for the computer 20. Although the exemplary environmentdescribed herein employs a magnetic hard disk 39, a removable magneticdisk 29 and a removable optical disk 31, other types of computerreadable media for storing data can be used, including magneticcassettes, flash memory cards, digital video disks, Bernoullicartridges, RAMs, ROMs, and the like.

Program code means comprising one or more program modules may be storedon the hard disk 39, magnetic disk 29, optical disk 31, ROM 24 or RAM25, including an operating system 35, one or more application programs36, other program modules 37, and program data 38. A user may entercommands and information into the computer 20 through keyboard 40,pointing device 42, or other input devices (not shown), such as amicrophone, joy stick, game pad, satellite dish, scanner, or the like.These and other input devices are often connected to the processing unit21 through a serial port interface 46 coupled to system bus 23.Alternatively, the input devices may be connected by other interfaces,such as a parallel port, a game port or a universal serial bus (USB). Amonitor 47 or another display device is also connected to system bus 23via an interface, such as video adapter 48. In addition to the monitor,personal computers typically include other peripheral output devices(not shown), such as speakers and printers.

The computer 20 may operate in a networked environment using logicalconnections to one or more remote computers, such as remote computers 49a and 49 b. Remote computers 49 a and 49 b may each be another personalcomputer, a server, a router, a network PC, a peer device or othercommon network node, and typically includes many or all of the elementsdescribed above relative to the computer 20, although only memorystorage devices 50 a and 50 b and their associated application programs36 a and 36 b have been illustrated in FIG. 1. The logical connectionsdepicted in FIG. 1 include a local area network (LAN) 51 and a wide areanetwork (WAN) 52 that are presented here by way of example and notlimitation. Such networking environments are commonplace in office-wideor enterprise-wide computer networks, intranets and the Internet.

When used in a LAN networking environment, the computer 20 is connectedto the local network 51 through a network interface or adapter 53. Whenused in a WAN networking environment, the computer 20 may include amodem 54, a wireless link, or other means for establishingcommunications over the wide area network 52, such as the Internet. Themodem 54, which may be internal or external, is connected to the systembus 23 via the serial port interface 46. In a networked environment,program modules depicted relative to the computer 20, or portionsthereof, may be stored in the remote memory storage device. It will beappreciated that the network connections shown are exemplary and othermeans of establishing communications over wide area network 52 may beused.

FIGS. 2 a and 2 b illustrate physical characteristics of an exemplaryLCD display device that can be used to display characters processedusing the hinting operations of the invention. The portion of LCD 70depicted in FIG. 2 a includes a plurality of rows R1-R12 and a pluralityof columns C1-C16. Color LCDs utilize multiple distinctly addressableelements and sub-elements, herein referred to as pixels and pixelsub-components, respectively. FIG. 2 b, which illustrates in greaterdetail the upper left hand portion of LCD 70, demonstrates therelationship between the pixels and pixel sub-components.

Each pixel includes three pixel sub-components, illustrated,respectively, as red (R) sub-component 72, green (G) sub-component 74and blue (B) sub-component 76. The pixel sub-components are non-squareand are arranged on LCD 70 to form vertical stripes of same-coloredpixel sub-components. The RGB stripes normally run the entire width orheight of the display in one direction. Common LCD display devicescurrently used with most portable computers are wider than they aretall, and tend to have RGB stripes running in the vertical direction, asillustrated by LCD 70. Examples of such devices that are wider than theyare tall have column-to-row ratios such as 640×480, 800×600, or1024×768. LCD display devices are also manufactured with pixelsub-components arranged in other patterns, including horizontal stripesof same-colored pixel sub-components, zigzag patterns or delta patterns.Moreover, some LCD display devices have pixels with a plurality of pixelsub-components other than three pixel sub-components. The presentinvention can be used with any such LCD display device or flat paneldisplay device so long as the pixels of the display device haveseparately controllable pixel sub-components.

A set of RGB pixel sub-components constitutes a pixel. Thus, as usedherein, the term “pixel sub-component” refers to one of the plurality ofseparately controllable elements that are included in a pixel. Referringto FIG. 2 b, the set of pixel sub-components 72, 74, and 76 forms asingle pixel. In other words, the intersection of a row and column, suchas the intersection of row R2 and column C1, represents one pixel,namely (R2, C1). Moreover, each pixel sub-component 72, 74 and 76 isone-third, or approximately one-third, the width of a pixel while beingequal, or approximately equal, in height to the height of a pixel. Thus,the three pixel sub-components 72, 74 and 76 combine to form a singlesubstantially square pixel. This pixel/sub-component relationship can beutilized for rendering text images on a display device, as will befurther explained below.

2. Hinting and Other Image Processing Operations

FIG. 3 is a block diagram illustrating the rasterization process or theprocess of rendering text on a display device. The rendering process ofFIG. 3 is capable of displaying characters on LCD display devices withsub-pixel precision. In other words, the dimensions of the features ofthe characters, particularly in the direction perpendicular to thestriping of the display device, are not limited to being integermultiples of the corresponding dimension of the full pixels. Instead,each separately controllable pixel sub-component of the pixelsrepresents a different portion of the displayed character.

As part of the rendering process, embodiments of the methods of theinvention include a step for hinting the image data such that atypographical feature (e.g., a stem) is adjusted to a position on a gridcorresponding to a high contrast boundary between pixel sub-components.The grid, as is further described below, has grid locations defined bythe pixels and pixel sub-components of the display device hinting theimage data, and the acts that correspond thereto, are described ingreater detail below.

The process of FIG. 3 begins with text output 101, which may be providedby an application such as a word processor or can be an electronic datastructure that represents a document. Character data 102 is typicallylocated in a data store such as a font file and generally containsinformation describing a particular set of characters.

Character data 102 may contain, for example, the outline of each glyphin the character set. The outlines are mathematical descriptions of theshapes of the glyphs in the character set or font using lines andcurves. Additionally, each outline has several control points which areneeded to scale the glyph to the desired type size and resolution. Someof the control points are on-curve points and other points are off-curvepoints. To define a character edge, for example, one or more on-curvecontrol points are chosen. Similarly, a pair of control points candelimit a character stem. The on-curve points are grid fitted in thehinting process and the off-curve points are placed using interpolationinstructions. Also, the control points may be used to indicate certaindimensions and distances, such as stem width. In the hinting process, atouched point refers to a point that has been hinted or grid-fitted andan untouched point refers to a point that has not been hinted orgrid-fitted. It is therefore possible for both touched and untouchedpoints to refer to either on-curve points or off-curve points. The terms“on-curve” and “off-curve” refer to the geometry of the characters andthe terms “touched” and “untouched” typically refer to the hinting orgrid-fitting strategy.

Text output 101 and character data 102 together represent image data100, which is received by scaling module 104. Scaling module 104 scalesimage data 100 such that subsequent processing operations may takeadvantage of the higher resolution that can be achieved using pixelsub-components. Because a pixel grid may have, for example, eitherhorizontal striping or vertical striping, the scaling is typicallyperformed at a greater rate in the direction that is perpendicular tothe grid striping. Examples of scaling operations that can be used inconjunction with the hinting operations of the invention are describedin greater detail in U.S. patent application Ser. No. 09/168,013, filedOct. 7, 1998, entitled “Methods and Apparatus for Resolving Edges withina Display Pixel,” which is incorporated herein by reference.

After image data 100 has been scaled, it is hinted or grid fitted byhinting module 106. Hinting module 106 functions in part to preserve, asmuch as possible, the regularity of character locations and distances,preserve the character proportions and to control the digitizedappearance. In many instances, however, the pixel grid of the displaydevice has low resolution, in comparison to the high resolution of thecharacter, and it is necessary to make certain trade-offs. For example,it is difficult to have both the right and left edges of a characterstem in the correct place and maintain the proper stem weight orthickness.

In general, hinting module 106 aligns the characters along pixelsub-component boundaries, regardless of whether the pixel sub-componentboundaries are also boundaries between full pixels. This is performed bychanging or distorting the glyph outline to ensure that the correctpixels and pixel sub-components are turned on or off when the glyph israsterized. Once a glyph is grid-fitted, the control points, which aretypically numbered, will not be changed, but the coordinates of thosecontrol points may have shifted.

Scan conversion module 108 is the process of converting the scaled andhinted character into a bitmap image. Because the characters or textdata may be hinted to pixel sub-component boundaries, each pixelsub-component can be separately mapped. This allows a character to berendered with higher resolution. Scan conversion module 108 determineswhich pixel sub-component should be turned on and which pixelsub-components should be turned off Scan conversion module 108 producesbitmap image 110 which is displayed on display device 112. The systemsand methods of the present invention are described herein with referenceto a display device having vertical striping, but can be applied todisplay devices having pixels arranged in other geometries, includingbut not limited to, horizontal striping. Examples of scan conversionoperations that can be used with the hinting operations of the inventionare disclosed in greater detail in U.S. patent application Ser. No.09/168,014, filed Oct. 7, 1998, entitled “Methods and Apparatus forPerforming Image Rendering and Rasterization Operations,” which isincorporated herein by reference.

The scan conversion operations can result in a single sample beingmapped to each of the pixel sub-components of a pixel. Alternatively,any number of samples can be mapped to the pixel sub-components. Ingeneral, spatially different sets of one or more samples are mapped toeach pixel sub-component. The process of mapping sets of samples topixel sub-components can be understood as a filtering process. Thefilters correspond to the position and number of samples included in thesets of samples mapped to the individual pixel sub-components. Filterscorresponding to different colors of pixel sub-components can have thesame size or different sizes. The samples included in the filters can bemutually exclusive (e.g., each samples is passed through only onefilter) or the filters can overlap (e.g., some samples are included inmore than one filter). In general, the filters used in the scanconversion process can be adapted to produce desirable color effects onthe displayed images.

FIG. 4 a illustrates pixel grid 200 that represents the position ofpixels on an LCD display device. Image data representing a textcharacter 205 has been scaled by a factor of three in the directionperpendicular to the stripes of the display device and by a factor ofone in the direction parallel to the stripes. The scaling is conductedso as to prepare the text character for the scan conversion process inwhich samples are mapped to individual pixel sub-components. Grid 200 isa computational tool used in the rendering process to adjust selectededges of the character to high contrast boundaries between pixelsub-components.

Pixel grid 200 corresponds to a plurality of pixels 201 of the LCDdisplay device (e.g., display device 70 of FIG. 2 a), with and eachpixel 201 having a red pixel sub-component 202, a blue pixelsub-component 203, and a green pixel sub-component 204. As is often thecase in the image rendering process, the outline of character 205 doesnot coincide with a pixel sub-component boundary. For instance, edge 206does not coincide with a pixel sub-component boundary. Because character205 does not match up with pixels 201 and the pixel sub-components 202,203, and 204, the shape and placement of character 205 may be altered orgrid-fitted during the rasterization process.

FIG. 4 b illustrates character 205 after it has been grid fitted topixel grid 200. As illustrated, character 205 has been physically moveddown and to the left and stems 209 have been slightly narrowed duringthe rasterization process. This rounding effect, as illustrated in FIG.4 b, occurred at pixel boundaries.

FIG. 4 c illustrates character 205 after it has been grid fitted topixel sub component boundaries. Character edge 206 has been snapped toboundary 208 between a green pixel sub-component and a blue pixelsub-component. Boundary 208 is preferred to boundary 207 between red andgreen pixel sub-components because boundary 208 has a higher contrast,although the invention can also extend to snapping character edges toboundaries between adjacent red and green pixel sub-components. Theability of the present invention to grid fit character 205 to pixelsub-component boundaries provides extra precision in the renderingprocess. In addition to fitting characters to pixel sub-componentboundaries, the selection of high contrast boundaries have been found toimprove the readability of the displayed characters. It has also beenfound that aligning the left edge of stems (e.g., edge 206) is oftenmore important in yielding highly readable characters than aligningother portions of the character with high contrast boundaries.

The invention extends to any process whereby selected edges ofcharacters are repositioned to high contrast pixel sub-componentboundaries during the hinting operation. A direct and full analysis ofthe topology of a character at runtime is one way of identifying thefeatures of the character that should be repositioned according to theinvention. While this type of full topological analysis can be used, itis often computationally inefficient or impractical to do so.Accordingly, any available technique for making only a partialtopological analysis at runtime can be used, thereby reducingcomputational time and resources.

Many character sets or fonts have font definitions or other informationthat lend themselves to being used to make an partial analysis of thetopology of the characters during runtime, sufficiently so that selectededges or portions of the characters can be repositioned to high contrastpixel sub-component boundaries during the hinting operation. Such fontinformation that can be used for this purpose includes any informationthat defines the position and spacing of certain typographical features,such as character edges and stem widths.

While the invention can be used with substantially any type of font, aspecific example of performing a partial topological analysis of acharacter outline during runtime will be presented in the context ofTrueType fonts. TrueType font files include control value tables (CVTs).The CVT is a table that is derived from information encoded in files,including True Type font files, that lists the color of distances aswell as dimensions for various letter features, such as stem widths. TheCVT allows a font designer to refer to particular distances by namerather than as an abstract distance. The width of a character stem, forexample, may be referred to as the Vertical Stem Thickness. As usedherein, the control value table is intended to be representative ofinformation associated with characters that describes certain distancesand dimensions of the character. Frequently, the distances anddimensions are described in terms of key control points on the outlineof the character.

One feature of CVTs that can conveniently used to describe the topologyof text characters is the description of certain distances in acharacter by color. A horizontal distance of a character, as describedin a CVT, can be a black distance, a white distance, or a grey distance.Black distances describe distances that are interior to a letterform(e.g., the width of a stem), white distances describe distances thatcorrespond to regions generally outside the body of the character (e.g.,left and right-side bearings, spaces between stems, the open counter of“O”, etc.), and grey distances describe distances that include a whiteand a black distance.

FIG. 5 a illustrates these distances with reference to character 205.Character 205 has two stems 209. The first stem begins at point A andends at point B and the second stem begins at point C and ends at pointD. The distances from point A to point B and from point C to point D areblack distances because they are interior to the letterform or outlineof character 205 and are indicated by black arrows 211. The horizontaldistance from left-side bearing point 210 to point A is a white distancebecause the distance is exterior to the letterform of character 205 andis indicated by white arrow 212. Similarly, the horizontal distance 219between point D and right-side bearing point 220 is a white distance.Distance 218 is also designated as a white distance, since it is adistance between stems 209 of character 205. The distance from point Ato point C, shown by grey arrow 213, is a grey distance because thedistance includes the black distance 211 from point A to point B and thewhite distance 218 from point B to point C.

The black, white, and grey distances are relative to each other and canbe illustrated as having a parent/child hierarchy in a directed acyclicgraph (DAG) as illustrated in FIG. 5 b. Thus, point A is reckoned fromleft-side bearing point 210 and is also the child of left-side bearingpoint 210. In turn, point A is the parent of points B and C and points Band C are the children of point A. The inherent structure of widths anddistances that are associated with a letterform allow for relevanttypographical features to be identified at runtime, even if thedistances and dimensions are not conveniently located in a control valuetable.

Before describing the present invention further, a brief description ofa glyph is presented. FIG. 6 is a block diagram illustrating the outlineand control points of a glyph. Outline 214 is defined by a series ofcontrol points 250, some of which may be on-curve and some of which maybe off-curve. If two successive control points are on-curve, they definea straight line. Control points are numbered consecutively, in thisexample, and if the curve is followed in the direction of increasingpoint numbers, the filled area will always be to the right of thecontrol point. Key control points which define the black distance of thestem width are points 1 and points 22 in FIG. 6.

FIG. 7 is a block diagram providing more detail to hinting module 106,previously discussed with reference to FIG. 3. Hinting module 106 can beconsidered to perform hinting the image data such that a typographicalfeature (e.g., a stem) is adjusted to a position on a grid correspondingto a high contrast boundary between pixel sub-components. FIG. 7illustrates examples of acts that correspond to hinting as is furtherexplained below.

Hinting module 106 receives image data after it has been scaled and thenfunctions to grid fit the character to grid points defined by pixels andpixel sub-components. In step 260, hinting module 106 processes thehinting instructions that are provided by the typographer and movescertain key control points to the appropriate grid points such that theletterform is visually pleasing and legible. In act 260, some parts orcontrol points of the character are moved and other parts and controlpoints are left untouched. According to one embodiment of the invention,the act of grid fitting the image data as represented by act 260 is oneexample of a portion of hinting the image data.

Phase control 270 involves moving the hinted points from act 260 ontopixel sub-component boundaries of high contrast. Frequently, the hintedpoints moved in phase control 270 define the left edge of a characterstem. According to the embodiment of the invention illustrated at FIG.7, the act of phase adjusting the typographical feature such that thetypographical feature coincides with a location of the grid thatrepresents a high contrast boundary between pixel sub-components asrepresented by act 270 is one example of a portion of hinting the imagedata.

Once the appropriate control points, such as those that define the leftedge of the stems of a character, are positioned at high contrastboundaries between pixel sub-components, the other control points of thescaled image data are adjusted as needed. For example, the right edgesof the stems can be repositioned on the grid such that the stems aregiven widths having values that may not be integer multiples of thewidth of entire pixels of the display device. In act 280, any points orsegments of the outline that were not moved during act 260 and phasecontrol 270 are now moved to new locations on the pixel grid usinginterpolation. Thus, in this embodiment, the act of interpolatingremaining control points is one example of a portion of hinting theimage data.

Using the acts illustrated in FIG. 7, the hinting process results inselected edges of the character being aligned with high contrast pixelsub-component boundaries, while allowing the character to havedimensions in the direction perpendicular to the striping of the displaydevice having sub-pixel values or, in other words, values that are notnecessarily integer multiples of the corresponding dimension of the fullpixels.

FIG. 8 is a detailed block diagram of the phase control implemented byhinting module 106 of FIG. 7 according to one embodiment of theinvention, and further illustrates the acts that correspond to at leasta portion of hinting the image data according to one embodiment of theinvention. As mentioned previously, the invention can be practiced usingany process that fully or partially analyzes the topology of the glyphat runtime. FIG. 8 relates to the use of a directed acyclic graph, suchas that associated with FIG. 5 a and FIG. 5 b. In step 271, the DAG ofcharacter 205 is derived from the interpretation of the hintinginstructions which utilize the CVT and is illustrated in FIG. 5 b.

In step 272, phase control 270 looks for distinctive typographicalfeatures. For example, phase control 270 may attempt to locate thevertical stems of a character by searching for alternating patterns ofblack and white horizontal distances if the pixel grid has verticalstriping. If the pixel grid has horizontal striping, phase control 270may attempt to locate horizontal line segments in the character bysearching for alternating patterns of black and white verticaldistances. In general, step 272 searches for particular typographicalfeatures, including but not limited to stems or horizontal segments.This is accomplished at runtime because the distances and dimensions ofthe characters are available in the CVT table.

For example, stems 209 of character 205 in FIG. 5 a are inferred bydetermining that the black distances represented by arrows 211 alternatewith the white distances from left-side bearing point 210 to point A andfrom point B to point C. It is also possible to use the grey distanceindicated by arrow 213 instead of the white distance from point B topoint C to infer the presence of a vertical stem.

In step 273, the DAG is traversed such that the stems may by phaseadjusted or positioned on a high contrast pixel sub-component boundary.The first node of DAG 300 in FIG. 5 b that indicates a stem is point A.The stem is moved such that the left edge of the stem falls on a highcontrast boundary, such as the boundary between the green and blue pixelsub-components. Thus, the green pixel sub-component is exterior to theletterform and the blue Z pixel sub-component is interior to theletterform. In a similar manner, the other stems of a character are alsohinted to a high contrast boundary.

One consideration that often arises when performing the hintingoperations of the invention is adjusting for the potential error thatthe hinting process may introduce. As adjustments to the positions ofthe interdependent nodes are made as the DAG is traversed, the resultingplacement of the right side bearing point of a character may becomedisplaced. This error may also have an effect on the overall width ofthe character being rendered. However, the contrast of the character isimproved. Thus, improved contrast may result in characters havingerroneous overall widths, which may include a displaced right sidebearing point.

The present invention may be embodied in other specific forms withoutdeparting from its spirit or essential characteristics. The describedembodiments are to be considered in all respects only as illustrativeand not restrictive. The scope of the invention is, therefore, indicatedby the appended claims rather than by the foregoing description. Allchanges which come within the meaning and range of equivalency of theclaims are to be embraced within their scope.

1. A system having a display device, the display device having aplurality of pixels each having a plurality of pixel sub-components ofdifferent colors, the system further comprising a processor forprocessing computer-executable instructions stored on one or morecomputer-readable media of the system and that are configured forimplementing a method of adjusting image data to a grid defined by thepixels and pixel sub-components in preparation for rasterizing an imageon the display device, the method comprising: obtaining image datahaving selected elements with positions relative to the grid, thepositions of at least one of the selected elements of the obtained imagedata not coinciding with a boundary between pixel sub-components;hinting the image data such that a typographical feature defined by oneor more of the selected elements is adjusted to a position on the gridthat corresponds to a selected boundary between pixel sub-components,the selected boundary being designated as a high contrast boundary dueto the color contrast of the sub-pixel components which define theboundary, and which may comprise a boundary other than one which isbetween pixels; and displaying the image on the display device using theimage data, the typographical feature being displayed at the highcontrast boundary.
 2. A system as defined in claim 1, wherein the imagedata represents a character, the method further comprising analyzing thetopology of the character at runtime to identify the typographicalfeature that is to be adjusted.
 3. A system as defined in claim 1,wherein the image is displayed such that individual pixel sub-componentsof the pixels represent spatially different portions of the image datarather than the different portions being represented by entire pixelsthat include the individual pixel sub-components.
 4. A system as definedin claim 1, wherein the typographical feature is a horizontal segment ofa character represented by the image data.
 5. A system as defined inclaim 1, wherein the typographical feature is a stem of a characterrepresented by the image data.
 6. A system as defined in claim 5,wherein hinting the image data is conducted such that a left edge of thestem is aligned with the high contrast boundary.
 7. A system as definedin claim 1, wherein hinting the image data comprises: grid fitting theimage data to grid points of the grid that corresponds to the pixels andpixel sub-components of the display device such that the one or moreelements defining the typographical feature of the image data correspondto the grid points; phase adjusting the typographical feature such thatthe typographical feature coincides with the high contrast boundary; andinterpolating the image data such that the position on the grid ofremaining elements of the image data is adjusted.
 8. A system as definedin claim 7, wherein phase adjusting further comprises: analyzing hintinginstructions associated with the image data for patterns that areindicative of the typographical feature; deriving, from the hintinginstructions, a directed acyclic graph, wherein the topology of thetypographical feature is at least partially defined by one or more nodesof the directed acyclic graph; and based on a traversal of the directedacyclic graph, identifying the position of the typographical feature andrepositioning the typographical feature to the high contrast boundary.9. A system as defined in claim 8, wherein analyzing the hintinginstructions further comprises searching for a selected pattern ofdistances having specified colors associated with the typographicalfeature.
 10. A system as defined in claim 1, wherein the method furthercomprises mapping spatially different sets of one or more samples of theimage data to individual pixel sub-components of the pixels rather thanmapping samples to entire pixels.
 11. A system as recited in claim 1,wherein the elements include one or more control points and the imagedata is associated with a character, wherein hinting the image datacomprises: analyzing the image data associated with the character, theimage data defining: an outline of the character using at least the oneor more control points; distances between key control points; and aparent/child relationship of the key control points; identifyingdistances of the character that are indicative of typographical featuresof the character to be positioned on high contrast boundaries, theidentified distances being associated with at least some of the keycontrol points; and positioning the identified key control points of thecharacter to grid points on the grid that correspond to high contrastboundaries of pixel sub-components on the display device.
 12. A systemas defined in claim 11, wherein the distances include black distanceswhich are interior to the outline of the character, white distances thatare exterior to the outline of the character and grey distances whichare a combination of black and white distances.
 13. A system as definedin claim 11, wherein the distances define a stem width identified by theat least some of the key control points.
 14. A system as defined inclaim 11, wherein the method further comprises positioning the stems ofthe character.
 15. A system as defined in claim 11, wherein the highcontrast boundary is between blue pixel sub-components and green pixelsub-components, the blue pixel sub-components being interior to thecharacter and the green pixel sub-components being exterior to thecharacter.
 16. A system as defined in claim 11, wherein the highcontrast boundary is between red pixel sub-components and green pixelsub-components, the red pixel sub-components being exterior to thecharacter and the green pixel sub-components being interior to thecharacter.
 17. A system as defined by claim 1, wherein hinting the imagedata comprises: deriving a parent/child hierarchy representative ofcertain ones of said selected elements from the image data; examiningthe image data for patterns that indicate typographical features,wherein the patterns are identified by the certain ones of said selectedelements and each node of the hierarchy is associated with one of thetypographical features; and while traversing a data structurerepresenting the hierarchy, phase adjusting one or more selectedtypographical features by positioning the certain ones of said selectedelements associated with the selected typographical features on gridpoints of the grid that correspond to a high contrast boundary betweenpixel sub-components, the high contrast boundary not being a boundarybetween pixels.
 18. A system having a display device having a pluralityof pixels for displaying image data, each pixel having a plurality ofpixel sub-components, the system comprising a processor for processingcomputer-executable instructions stored on one or more computer-readablemedia of the system and that are configured for implementing a methodfor hinting the image data, the method comprising: grid fitting theimage data to grid points of a grid that corresponds to the pixels andpixel sub-components of the display device such that one or moreelements defining a typographical feature of the image data correspondto the grid points; phase adjusting the typographical feature such thatthe typographical feature coincides with a location of the grid thatrepresents a boundary between pixel sub-components, the boundary beingdesignated as a high contrast boundary, wherein phase adjustingcomprises: analyzing hinting instructions associated with the image datafor patterns that are indicative of the typographical feature; deriving,from the hinting instructions, a directed acyclic graph, wherein thetopology of the typographical feature is at least partially defined byone or more nodes of the directed acyclic graph; and based on atraversal of the directed acyclic graph, identifying the position of thetypographical feature and repositioning the typographical feature to thehigh contrast boundary; and interpolating the image data such that theposition on the grid of remaining elements of the image data isadjusted.
 19. A system as recited in claim 18, wherein the methodfurther comprises: traversing the directed acyclic graph; encountering anode that corresponds to a point of the image data that is to berepositioned on the grid; and accounting for an error introduced by arepositioning of a point corresponding to a previous node of thedirected acyclic graph.
 20. A system as defined in claim 18, whereinanalyzing the hinting instructions further comprises searching for aselected pattern of distances having specified colors associated withthe typographical feature.